package com.vogue.supplymall.admin.business.common.constant;

/**
 * @author zhangliang
 * @date Create in 2018-06-20
 */
public enum ErrorCode {

    ProcessFail(9000, "Process Fail"),
    OpenOrganFail(9001, "OpenOrganFail");

    private int code;
    private String msg;

    private ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getName(int code) {
        for (ErrorCode e : ErrorCode.values()) {
            if (e.code == code) {
                return e.msg;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
